Hello Tom,
I am trying to flush out the limit switch setting implementation when creating one of my axis objects.
I don't do a lot of bit twiddling, so I am sure I must be overlooking something....
Based on the online manual:
32-bit hexadecimal value:
Bit 0 1=Stop Motor on Neg Limit, 0=Ignore Neg limit
Bit 1 1=Stop Motor on Pos Limit, 0=Ignore Pos limit
Bit 2 Neg Limit Polarity 0=stop on high, 1=stop on low
Bit 3 Pos Limit Polarity 0=stop on high, 1=stop on low
Bits 4-7 Action - 0 Kill Motor Drive
1 Disallow drive in direction of limit
2 Stop movement
Bits 16-23 Neg Limit Bit number
Bits 24-31 Pos Limit Bit number
I am generating a 32-bit hex from a binary string as follows
111100100000110000011111
Obviously I am padding where appropriate to keep the bits in their online manual-prescribed slots.
When I convert to hex, I get:
F20C1F.
If I try to relate my binary string to the settings in your config/flash screen it should read:
1111 = true,true,true,true
Watch Limit 1 = true
Watch Limit 2 = true
Stop on Limit 1 = true
Stop on Limit 2 = true
0010 = 2
The Action should be Stop Movement
00001100 = 12
My Positive Limit should be 12
00011111 = 31
And the Negative Limit should come out as 31
But if I create a .mot file in your setup screen with the above values, I get this :
1f0c002f
Which does not contain 32 bits of information :
11111000011000000000000101111 = 29 bits...
Any ideas where I am going wrong?
Thanks,
-Brad Murry